<!-- 信息页面内容单元组件 -->
<template>
  <van-cell v-if="formattedContent.length <= 10" :title="title" :value="formattedContent" />
  <van-cell v-else :title="title" :label="formattedContent" />
</template>

<script setup>
const props = defineProps({
  title: String,
  content: [String, Number]
})

let formattedContent = ref('')
if (props.content) {
  formattedContent = props.content.toString()
}

</script>

<style lang="scss" scoped>
  .van-cell {
    font-size: 16px;
  }
  ::v-deep .van-cell__label {
    font-size: 16px;
    line-height: 24px;
  }
</style>